<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>open广告弹窗</title>
</head>
<body>
    <h1>窗口开关</h1>
    <button onclick="open_win()">打开窗口</button>
    <button onclick="close_win()">关闭子窗口</button>
    <button onclick="windsow.close()">关闭当前窗口</button>
    <script>
        var newWin;
        function open_win(){
            newwin = window.open("https://www.opposhop.cn/cn/web/products/9506.html?utm_source=baidu&utm_medium=cpc&utm_campaign=pp0014910&utm_term=oppo_FindN2")
                }
                function close_win(){
                    if(newwin&&!newWin.close){
                        newWin.close();
            }                       
        }
    </script>
</body>
</html>